(function() {

  var types = $.urlToObj(location.href).types.split(',')
  $.each(types, function (i, item) {
    $('.cc-box-group .cc-box').eq(item-1).addClass('show')
  })

  $('.cc-box-group .cc-box').on('click', function () {
    var type = $(this).index() + 1
    switch (type) {
      case 1:
        location.assign('/admin/index.html')
        break;
      case 2:
        location.assign('/teacher/index.html')
        break;
      case 3:
        location.assign('/student/index.html')
        break;
    }
  })

}());
